import React from 'react';
import DataTable from 'components/DataTable';
import Icon from 'components/Icon';
import Button from 'components/Button';
import Upload from 'components/Upload';
import Image from 'components/Image';
import checkbox from "../../../../../components/Form/model/checkbox";
import { Modal, Layout } from "antd";
import Panel from 'components/Panel';
import { router } from 'dva';
const { Content } = Layout;
const { Link } = router;
export default (self, dict) => [
    {
        title: '商家',
        name: 'merchant_name',
        tableItem: {},
    },
    {
        title: '图片',
        name: 'phote',
        tableItem: {
            width: 150,
            render: (text, record) => (
                <Content>
                    <Image
                        style={{ width: 150 }}
                        src="https://www.foodiesfeed.com/wp-content/uploads/2015/09/summer-juicy-beef-burger.jpg"
                        previewList={[
                            'https://www.foodiesfeed.com/wp-content/uploads/2017/05/juicy-burger-in-a-vibrant-interior.jpg',
                            'https://www.foodiesfeed.com/wp-content/uploads/2019/06/top-view-for-box-of-2-burgers-home-made.jpg',
                            'https://www.foodiesfeed.com/wp-content/uploads/2019/04/mae-mu-pancakes.jpg'
                        ]}
                    />
                </Content>

            )
        },
    },
    {
        title: '名称',
        name: 'title',
        tableItem: {},
        searchItem: {},
    },
    {
        title: '投票方式',
        name: 'vote_way',
        tableItem: {},
        searchItem: {},
    },
    {
        title: '投票次数',
        name: 'vote_time',
        tableItem: {},
        searchItem: {},
    },
    {
        title: '主题',
        name: 'theme',
        tableItem: {},
    },
    {
        title: '状态',
        name: 'status_text',
        tableItem: {},
        searchItem: {},
    },
    {
        title: '开始时间',
        name: 'start_time',
        tableItem: {},
    },
    {
        title: '结束时间',
        name: 'end_time',
        tableItem: {},
    },
    {
        title: '浏览量',
        name: 'brown_count',
        tableItem: {},
    },
    {
        title: '创建时间',
        name: 'create_time',
        tableItem: {},
    },
    {
        title: '背景色',
        name: 'bg_color',
        tableItem: {},
    },
    {
        title: '操作',
        tableItem: {
            width: 90,
            fixed: 'right',
            render: (text, record) => (
                <DataTable.Oper>
                    {/* <Button tooltip="修改" onClick={e => self.onUpdate(record)}>
                        <Icon type="edit" />
                    </Button>
                    <Button tooltip="删除" onClick={e => self.onDelete(record)}>
                        <Icon type="trash" />
                    </Button> */}
                    <Button tooltip="跳转到新路由">
                        <Link to={"/activity/vote/detail?id=" + record.id}>
                            <Icon type="LinkOutlined" antd />
                        </Link>
                    </Button>
                </DataTable.Oper>
            )
        }
    }
];
